package com.iswoak.netctoss.service.impl;

import java.util.List;

import com.iswoak.netctoss.dao.FeeInfoDao;
import com.iswoak.netctoss.dao.impl.FeeInfoDaoImpl;
import com.iswoak.netctoss.entity.FeeInfo;
import com.iswoak.netctoss.service.FeeInfoService;
import com.iswoak.netctoss.util.PageUtil;

/**
 * @version: 1.0
 * @author: fxz
 * @Description:
 * @date: 2019年7月6日 下午2:51:48
 */
public class FeeInfoServiceImpl implements FeeInfoService {

	private FeeInfoDao feeInfoDao = new FeeInfoDaoImpl();
	
	public PageUtil<FeeInfo> page(Integer currPage, Integer pageSize) {
		//根据条件进行 条件分页查询
		List<FeeInfo> list= feeInfoDao.page((currPage-1)*pageSize, pageSize);//roleInfoDao.page(roleInfoVo, (currPage-1)*pageSize, pageSize);
		//把所有分页的数据封装到page对象中
		PageUtil<FeeInfo> page= new PageUtil<FeeInfo>(currPage, pageSize, feeInfoDao.count(), list);
		return page;
		
		
		
	}

	//删除
	public int del(Integer costId) {		
		return feeInfoDao.del(costId);
	}
	
	//修改状态为开通
	public int updateStatus(Integer costId) {
		return feeInfoDao.updateStatus(costId);
	}
	
	// 排序分页显示所查询到数据
	public List<FeeInfo> sortList(String column, String flag,Integer currPage, Integer pageSize) {
		return feeInfoDao.sortList(column, flag, (currPage-1)*pageSize, pageSize);
	}

}
